package org.jeecg.modules.purchase.Vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.file.entity.ProcurementFile;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "PurchasePlanVo对象", description = "采购计划Vo")
public class PurchasePlanVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "方案类型")
    private String schemeType = "最低价中标";

    @ApiModelProperty(value = "书面说明")
    private String explanation;

    @ApiModelProperty(value = "允许低于成本价：0-不允许，1-允许")
    private int allowPricesBelowCost;

    @ApiModelProperty(value = "工程名称")
    @NotBlank(message = "工程名称不能为空")
    private String projectName;

    @ApiModelProperty(value = "项目编号")
    @NotBlank(message = "项目编号不能为空")
    private String projectNumber;

    @ApiModelProperty(value = "所属类目")
    @Dict(dicCode = "engineering_category")
    @NotBlank(message = "所属类目不能为空")
    private String category;

    @ApiModelProperty(value = "工程规模")
    private String projectScale;

    @ApiModelProperty(value = "预算金额")
    @NotNull(message = "预算金额不能为空")
    private BigDecimal budgetAmount;

    @ApiModelProperty(value = "资金来源")
    @Dict(dicCode = "fund_source")
    private String fundSource;

    @ApiModelProperty(value = "计划采购时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date planPurchaseTime;

    @ApiModelProperty(value = "预计开工时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date expectedStartTime;


    @ApiModelProperty(value = "项目描述")
    private String projectDescription;

    @ApiModelProperty(value = "项目联系人")
    private String projectContact;

    @ApiModelProperty(value = "联系人电话")
    private String contactPhone;

    @ApiModelProperty(value = "项目公司")
    private String projectCompany;


    @ApiModelProperty(value = "采购清单")
    private String purchaseList;

    @ApiModelProperty(value = "备注")
    private String remark;


    @ApiModelProperty(value = "审核状态：0-待审核，1-审核通过，2-退回补正，3-拒绝")
    @Dict(dicCode = "audit_status")
    private String auditStatus;

    @ApiModelProperty(value = "编制状态：0-草稿，1-发布")
    @Dict(dicCode = "status")
    private String Status;

    @ApiModelProperty(value = "审核意见")
    private String auditOpinion;

    @ApiModelProperty(value = "审核人")
    private String auditor;

    @ApiModelProperty(value = "审核时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    @ApiModelProperty(value = "公告截止时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date announcementEndTime;

    @ApiModelProperty(value = "报名截止时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registrationEndTime;

    @ApiModelProperty(value = "投标截止时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date biddingEndTime;

    @ApiModelProperty(value = "开标时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date openingTime;

    @ApiModelProperty(value = "评标时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date evaluationTime;

    @ApiModelProperty(value = "中标时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date winningTime;

    @ApiModelProperty(value = "流标时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date flowTime;


    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "文件数组")
    private List<ProcurementFile> procurementFile;

    @ApiModelProperty(value = "公告节点说明")
    private String announcementExplanation;

    @ApiModelProperty(value = "报告节点说明")
    private String reportExplanation;

    @ApiModelProperty(value = "投标节点说明")
    private String bidExplanation;

    @ApiModelProperty(value = "开标节点说明")
    private String openbidExplanation;

    @ApiModelProperty(value = "评标节点说明")
    private String evaluationbidExplanation;

    @ApiModelProperty(value = "文件数组")
    private List<ProcurementFile> document;

    @ApiModelProperty(value = "文件数组")
    private List<ProcurementFile> announcement;
}
